# Maintainer: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=gitolite
pkgver=3.6.12
pkgrel=2
pkgdesc="Centralized git server, with very fine-grained access control and many powerful features"
url="https://github.com/sitaramc/gitolite"
arch="noarch"
license="GPL-2.0-only"
depends="git perl"
install=$pkgname.pre-install
pkgusers="git"
pkggroups="git"
source="$pkgname-$pkgver.tar.gz::https://github.com/sitaramc/gitolite/archive/v$pkgver.tar.gz"

# secfixes:
#   3.6.11-r0:
#     - CVE-2018-20683

package() {
	install -d "$pkgdir"/usr/bin
	install -d "$pkgdir"/usr/lib/gitolite

	./install -to "$pkgdir"/usr/lib/gitolite
	echo $pkgver > "$pkgdir"/usr/lib/gitolite/VERSION
	ln -s /usr/lib/gitolite/gitolite "$pkgdir"/usr/bin/
	install -o git -g git -d -m 700 "$pkgdir"/var/lib/git
}

sha512sums="f6a7f4daf8a6f73db823a95cd677c1c436e04a05460a239b5844468cf0f3e6f8da1b1cd86d98c84bb8e80e5ca446c9afd0ca221cce622398c0d0a3ce18062c22  gitolite-3.6.12.tar.gz"
